home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Medal Software 3
/
Gold Medal Software - Volume 3 (Gold Medal) (1994).iso
/
prog
/
ru04.arj
/
FORMATS.TXT
< prev
next >
Wrap
Text File
|
1994-02-10
|
2KB
|
51 lines
THE 'RAW' FORMAT
The format is broken up into three main parts. The header, palette, and image
portions.
--- HEADER ---
Bytes
-----
1 , 2 - Width of Image
3 , 4 - Height of Image
5 , 6 - Number of Colors - if 0 image does not contain a palette
--- PALETTE ---
7 , 8 , 9 - Red, Green, Blue values of the first color. The values will range
from 0 to 63. Each additional three bytes indicate the values of
the next color. For an image that contains 16 colors the PALETTE
size will be 48 bytes (3*16).
--- IMAGE ---
What ever follows after the palette is the actual image. The first byte
following the palette will be the first pixel starting from the left top corner.
The remaining pixels follow row by row. Each pixel takes exactly one byte no
matter how many colors there are in the image.
THE 'RES' FORMAT
Bytes
-----
1,2,3 - Identification field. Should spell RES in ascii
4,5 - Number of resource items in the file
The next 22 bytes contain the TYPE, ID, OFFSET, and SIZE of first resource
item. If there is a second item the format continues with the next 22 bytes
and so on.
6,7 - TYPE
8-19 - ID
20-23 - OFFSET
24-27 - SIZE
The TYPE field indicates what kind of format it was converted to with the
RastPort. The ID is a 12 letter/number put in the by the user to describe
the resource item. The OFFSET indicates where in the resource file the item
is located. The last field describes the size of the resource item.